using UnityEngine;
using System.Collections;

public class MainMenu : MonoBehaviour 
{
	public UIButton btnPlay;
	public UIButton btnExit;
	public ConTrolPlayTest controlPlayTest;

	// Use this for initialization
	void Start () 
	{
		PlayClick();
	}
	
	// Update is called once per frame
	void Update () 
	{

	}

	void PlayClick()
	{
		controlPlayTest.InitAllSugar();
		btnPlay.gameObject.SetActive(false);

	}
	
	void ExitClick()
	{
		if (btnPlay.gameObject.active)
		{
			Application.Quit();
		}
		else
		{
			btnPlay.gameObject.SetActive(true);
			controlPlayTest.DestroyAllSugar();			
		}
	}
}
